<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
      autoReload="false"
      throwExceptions="true">

	<variable name="logDirectory" value="${basedir}/logs"/>
	<variable name="maxArchiveDays" value="30"/>

	<variable name="defaultCsvLayout">
		<layout xsi:type="CsvLayout">
			<column name="Time" layout="${longdate}" />
			<column name="Level" layout="${level}"/>
			<column name="Logger" layout="${logger}"/>
			<column name="Message" layout="${message}" />
			<column name="Exception" layout="${exception}" />
		</layout>
	</variable>

	<targets>
		<target name="Console" xsi:type="ColoredConsole" layout="${uppercase:${level}} ${message}"/>
		<target name="LogFile" xsi:type="File" layout="${defaultCsvLayout}" fileName="${logDirectory}/${shortdate}.log" maxArchiveDays="${maxArchiveDays}" />	
	</targets>
		
	<rules>
		<logger name="*" minlevel="Trace" writeTo="Console" />
		<logger name="*" minlevel="Info" writeTo="LogFile" />
	</rules>
</nlog>
